home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / compuserve-file-archive / 18 Board & Card Games / NUKE.SEQ < prev    next >
Encoding:
Text File  |  2019-04-13  |  19.1 KB  |  764 lines

  1.  
  2.  
  3. 0 rem*  meltdown by d. n. price
  4. 1 rem*based on prog by s.r. berggren
  5. 2 rem*as modified by wim 3/30/82
  6. 3 rem*all rights assigned to public
  7. 4 rem*domain software inc., west milton
  8. 5 rem*ohio.
  9. 6 cr$="               "
  10. 9 bc=53280:sc=53281:lc=646:pokebc,12:pokesc,0:pokelc,5:goto40
  11. 10 poke198,0:b$="":print" ";:poke167,1
  12. 11 geta$:ifa$=""then11
  13. 12 z=asc(a$):ifz=94then15
  14. 13 ifz<48orz>57then11
  15. 14 printa$;:b$=b$+a$:iflen(b$)<3then11
  16. 15 poke167,0:print" ";:return
  17. 28 "pharoah's needle" prg        
  18. 40 poke53272,23:r=rnd(-ti):bl$="                                    "
  19. 41 t1$=" SAN ANDREAS NUCLEAR POWER PLANT NO. 2  "
  20. 42 t2$="OPER:":t3$="STATUS REPORT, DAY":fortd=1to10
  21. 43 print" "cr$"
  22. Meltdown!":fort=1to150:next:print" "cr$"
  23. Meltdown!":fort=1to150:next
  24. 44 nexttd:print"
  25. "cr$spc(1)"at the
  26. ":printt1$:print"
  27.  
  28.      Original Game By S. R. Berggren
  29. 45 print"
  30. With modifications by Ivan & Hume Smith.
  31. 46 print"
  32.  
  33. Other modifications by the staff of the
  34. 47 print"
  35.   Bridgewater High School, Nova Scotia
  36. 48 print"
  37.      Bill Munch and Dennis N. Price
  38. 49 input"
  39.  
  40.  
  41. Operator's Last Name";na$
  42. 50 iflen(na$)>8thenna$=left$(na$,8)
  43. 59 print"
  44.  
  45. This program simulates the operation of"
  46. 60 print"
  47. a nuclear power reactor.";:gosub5300:print"  The object"
  48. 70 print"
  49. is to operate the plant at as high a"
  50. 80 print"
  51. power output as possible";:gosub5300:print", without"
  52. 90 print"
  53. causing a reactor meltdown.":gosub5300
  54. 92 forz5=1to7:printtab(18)"meltdown":forz6=1to50:nextz6
  55. 94 printtab(18)"meltdown":forz6=1to50:nextz6,z5:gosub5310
  56. 100 input" Do you want instructions   n";z$:ifz$="n"then352
  57. 102 ifz$<>"y"then100
  58. 110 print" The Control Rods regulate the amount of heat produced by the reactor.
  59. 112 print"The further the Control Rods are with-  drawn the more heat is produced.
  60. 114 print"
  61. The Primary Coolant carries this heat
  62. 115 print"to the Heat Exchanger where the heat
  63. 116 print"causes the Secondary Coolant to turn
  64. 118 print"to steam.  This steam spins the Turbine
  65. 120 print"which in turn drives the Generator and
  66. 122 print"thereby produces electricity.
  67. 124 print"
  68. The Secondary Coolant is then pumped to
  69. 126 print"the Cooling Tower where it is cooled
  70. 128 print"and condensed and then pumped back to
  71. 130 print"the Heat Exchanger to begin the cycle   again.
  72. 180 print"
  73. The Emergency Coolant is used to shut
  74. 182 print"down the reactor, or if the temperature
  75. 183 print"of the reactor exceeds the maximum.":gosub5310
  76. 184 print" Unlike other coolants, the Emergency
  77. 185 print"Coolant is not recycled.  This means
  78. 186 print"your supply of Emergency Coolant is verycritical.
  79. 192 print"
  80. An increased flow of primary coolant"
  81. 194 print"will lower the reactor core temperature"
  82. 196 print"and will raise the heat exchanger"
  83. 198 print"temperature."
  84. 200 print"
  85. An increased flow of secondary coolant"
  86. 202 print"will lower the heat exchanger tempera-
  87. 203 print"ture and will increase power production
  88. 204 print"but, it will also raise the temperature
  89. 205 print"of the cooling tower."
  90. 210 print"
  91. Successful operation depends on"
  92. 212 print"maintaining a careful balance between
  93. 213 print"the high temperatures needed for power
  94. 214 print"production and the thermal limits of
  95. 215 print"the equipment.":gosub5310
  96. 220 print"
  97.  
  98.  
  99.  
  100. Enter  D  to see reactor diagram."
  101. 222 print"
  102. Enter  I  for operating instructions."
  103. 224 print"
  104. Enter  S  to start operation."
  105. 226 print"
  106. "tab(13);:input"s";a$:ifa$="d"thengosub16000:goto220
  107. 227 ifa$="s"then390
  108. 228 ifa$<>"i"then226
  109. 230 print" The controls are operated by typing in"
  110. 235 print"the desired control rod setting and the
  111. 240 print"flow rates of the different coolants.
  112. 241 print"
  113. Use settings from 0 to 100.
  114. 242 print"
  115. Press the ^ key after entering the
  116. 243 print"desired setting.  If no change is to be
  117. 244 print"made, simply press the ^ key and the
  118. 245 print"previous setting will remain unchanged
  119. 246 print"and you will proceed to the next step."
  120. 255 print"
  121. After the desired entries have been
  122. 260 print"made, the next days conditions will be
  123. 265 print"calculated and displayed on the screen."
  124. 270 print"
  125. The power plant can be kept operating
  126. 272 print"until the fuel is exhausted or until a
  127. 274 print"meltdown occurs.
  128. 276 print"
  129. The reactor fuel will last about 100
  130. 278 print"to 150 days, depending on the amount of
  131. 280 print"energy produced.":gosub5310
  132. 290 print" When the reactor fuel is exhausted
  133. 295 print"your performance will be summarized.
  134. 300 print"
  135. If you desire to repair any leaks or
  136. 305 print"damage, bring the reactor temperature
  137. 310 print"below 100 and shut off all coolant
  138. 315 print"flows.  This will cause an automatic
  139. 320 print"maintenance shutdown.  All necessary
  140. 325 print"repairs will be made, all coolants will
  141. 330 print"be replenished.  The appropriate repair
  142. 335 print"costs will be calculated and displayed.
  143. 340 print"
  144. The greater the damage, the longer any
  145. 345 print"repairs will take and therefore repair
  146. 346 print"costs will be higher."
  147. 347 print"
  148. When temperatures approach their maxi-
  149. 348 print"mums, they will flash several times to
  150. 349 print"warn you to watch them closely.":gosub5310
  151. 352 print" "tab(13)"
  152.  
  153.  
  154.  
  155.  
  156. WARNING:"
  157. 355 printtab(7)"
  158.  
  159. THIS POWER PLANT HAS"
  160. 360 printtab(3)"
  161.  
  162. NO AUTOMATIC SAFETY DEVICES!!":z4=13:gosub5300
  163. 362 print"
  164.  
  165.  
  166. The Operator, "na$", is responsible
  167. 364 print"for the safe and efficient operation
  168. 366 print"of the reactor, in accordance with the
  169. 368 print"established procedures.  Good Luck!
  170. 370 gosub5300:gosub5310:goto220
  171. 390 pokebc,12
  172. 400 gosub2000
  173. 410 rh=0:rl=0:tt=0:fl=100:rc=0
  174. 420 day%=0:d4%=0
  175. 430 qp%=1-(rnd(2)>.57)-(rnd(2)>.95)
  176. 440 qs%=1-(rnd(2)>.57)-(rnd(2)>.95)
  177. 442 rem  qp%=quality of primary loop workmanship, qs%=same for secondary loop
  178. 444 rem  1 for first-class work, 2 for second-class, 3 for third-class
  179. 450 dmge%=0
  180. 455 a%=0:a1%=0:a2%=0
  181. 460 day%=day%+1:print" ";:rem  write report
  182. 462 ifrt%>800orxt%>500orct%>300orgz%>2000then480
  183. 464 ifgz%<1000and(day%-d4%>8)then480
  184. 466 ifev%<200orpv%<100orsv%<100then480
  185. 468 ifrd%>3orpd%>4orsd%>4ored%>2then480
  186. 470 ifpb%>0orsb%>0orxb%>0orgb%>0then480
  187. 472 goto700
  188. 480 gosub17000:printt1$
  189. 490 printt2$;spc(1);na$;spc(2);t3$;day%"
  190. "
  191. 500 print"WARNINGS:
  192. ":sw=1
  193. 510 ifrt%<800then520
  194. 512 print"   Reactor overheated":rd%=rd%+1-(rt%>850)-(rt%>900)-2*(rt%>950)
  195. 514 pd%=pd%+1:ed%=ed%+1-(rt%>850):sw=2
  196. 520 ifxt%<500then530
  197. 522 print"   Heat exchanger overheated"
  198. 524 xd%=xd%+1-(xt%>600):pd%=pd%+1:sd%=sd%+1:sw=2
  199. 530 ifgz%<2000then540
  200. 532 print"   Turbine overloaded"
  201. 534 td%=td%+1-(gz%>2500):sd%=sd%+1:sw=2
  202. 540 ifct%>300thenprint"   Cooling tower overheated":sd%=sd%+1:sw=2
  203. 550 ifgz%<1000thenprint"   Power output low":sw=2
  204. 560 ifev%<200thenprint"   Emergency coolant low":sw=2
  205. 570 ifpv%<100thenprint"   Primary coolant low":pd%=pd%+1:sw=2
  206. 580 ifsv%<100thenprint"   Secondary coolant low":sd%=sd%+1:sw=2
  207. 590 onswgoto600,610
  208. 600 printtab(11)"None"
  209. 610 print"
  210. DAMAGE:
  211. ":sw=1
  212. 620 ifrd%>3thenprint"reactor core damaged":sw=2
  213. 630 ifpd%<5then640
  214. 632 print"Primary coolant leak:";pd%;"L/day"
  215. 634 pv%=(pv%-pd%)*(-((pv%-pd%)>0)):sw=2
  216. 640 ifsd%<5then650
  217. 642 print"Secondary coolant leak:";sd%;"L/day"
  218. 644 sv%=(sv%-sd%)*(-((sv%-sd%)>0)):sw=2
  219. 650 ifed%<3then660
  220. 652 print"Emergency coolant leak:";2*ed%;"L/day"
  221. 654 ev%=(ev%-2*ed%)*(-((ev%-2*ed%)>0)):sw=2
  222. 660 ifpb%=0then670
  223. 662 print"Primary coolant pump failure:";
  224. 664 print10*pd%*(-(pd%<10))+100*(-(pd%>=10));"%":sw=2
  225. 670 ifsb%=0then680
  226. 672 print"Secondary coolant pump failure:";
  227. 674 print10*sd%*(-(sd%<10))+100*(-(sd%>=10));"%":sw=2
  228. 680 ifxb%>0thenprint"Heat exchanger failure":sw=2
  229. 690 ifgb%>0thenprint"Turbine failure":sw=2
  230. 692 onswgoto694,696
  231. 694 printtab(11)"None"
  232. 696 gosub5310
  233. 700 pokesc,15:print" ":printt2$spc(1)na$spc(2)t3$day%
  234. 710 ifrd%>5then3000
  235. 722 printtab(6)"
  236. CONTROL ROD POSITION:"a%"%":print""
  237. 724 print"
  238. TEMPERATURES:    MAX    CHANGE    NOW
  239. 730 print"Reactor Core.....800
  240. 732 printtab(25)""rt%-t7%:printtab(33)""rt%
  241. 734 t7%=rt%
  242. 740 print"Heat Exchanger...500
  243. 742 printtab(25)""xt%-t8%:printtab(33)""xt%
  244. 744 t8%=xt%
  245. 750 print"Cooling Tower....300
  246. 752 printtab(25)""ct%-t9%:printtab(33)""ct%
  247. 754 t9%=ct%
  248. 760 print"
  249. COOLANTS:        Level  Leakage   Flow
  250. 762 kw%=tt/day%
  251. 770 print"Emergency........"tab(16)""ev%tab(22)""ed%"L/Day"tab(33)""ef%
  252. 780 print"Primary.........."tab(16)""pv%tab(22)""pd%"L/Day"tab(33)""pf%
  253. 790 print"Secondary........"tab(16)""sv%tab(22)""sd%"L/Day"tab(33)""sf%
  254. 810 print"
  255. PRODUCTION"
  256. 820 print"Power Output (MAX 2000 Kw):..."tab(30)gz%"Kw"
  257. 821 kw%=tt/day%
  258. 822 ve=int(24*tt*.07071):gp=ve-rc
  259. 833 rc$=str$(rc):ifrc<1000thenrc$="$"+rc$:goto835
  260. 834 rc$="$"+left$(rc$,len(rc$)-3)+","+right$(rc$,3)
  261. 835 print"Total Repair Costs:........."tab(29)rc$
  262. 838 ve$=str$(ve):ifve<1000thenve$="$"+ve$:goto840
  263. 839 ve$="$"+left$(ve$,len(ve$)-3)+","+right$(ve$,3)
  264. 840 print"Value of Power Produced:...."tab(29)ve$
  265. 845 print"Average Power Output:......."tab(30)kw%"Kw"
  266. 850 print:print:print"Percentage of fuel remaining = ";fl
  267. 851 ifrt%>775thengosub8000:goto852
  268. 852 ifxt%>475thengosub9000:goto853
  269. 853 ifct%>275thengosub9500:goto900
  270. 856 if(100-rl)<5thenprint"Reactor fuel exhausted":fort=1to5000:next:goto4000
  271. 900 rem  get new control values
  272. 910 a2%=a1%:a1%=a%
  273. 920 poke214,23:print:printbl$
  274. 930 poke214,23:print:print"Control Rod Position?";:gosub10
  275. 940 ifb$=""then960
  276. 950 a%=val(b$):a%=a%+(100-a%)*(-(a%>100))
  277. 960 poke214,23:print:printbl$
  278. 970 poke214,23:print:print"Emergency Coolant Flow?";:gosub10
  279. 980 ifb$=""then1000
  280. 990 ef%=val(b$):ef%=ef%+(100-ef%)*(-(ef%>100))
  281. 1000 poke214,23:print:printbl$
  282. 1010 poke214,23:print:print"Primary Coolant Flow?";:gosub10
  283. 1020 ifb$=""then1040
  284. 1030 pf%=val(b$):pf%=pf%+(100-pf%)*(-(pf%>100))
  285. 1040 poke214,23:print:printbl$
  286. 1050 poke214,23:print:print"Secondary Coolant Flow?";:gosub10
  287. 1060 ifb$=""then1100
  288. 1070 sf%=val(b$):sf%=sf%+(100-sf%)*(-(sf%>100))
  289. 1100 ifpf%=0andsf%=0andrh<1andrt%<100anda%=0then1120
  290. 1110 goto1140
  291. 1120 gosub2000:poke214,23:print:printbl$
  292. 1122 poke214,23:print:print"Maintenance shutdown:"md%"days.":rc=rc+(md%*650)
  293. 1130 fori=1to5000:nexti
  294. 1140 ifef%>ev%thenef%=ev%
  295. 1200 rem  damage assessment and operation calculations
  296. 1205 ev%=ev%-ef%+2*ed%*(ed%>3)
  297. 1210 onqp%goto1211,1213,1215:rem leakage probabilities
  298. 1211 pd%=pd%+(pf%>65)*(rnd(2)>.9998)+(pf%>90)*(rnd(2)>.996)
  299. 1212 pd%=pd%+(pf%>95)*(rnd(2)>.95)-(4000*rnd(2)<day%):goto1220
  300. 1213 pd%=pd%+(pf%>55)*(rnd(2)>.9995)+(pf%>80)*(rnd(2)>.993)
  301. 1214 pd%=pd%+(pf%>92)*(rnd(2)>.94)-(2700*rnd(2)<day%):goto1220
  302. 1215 pd%=pd%+(pf%>40)*(rnd(2)>.999)+(pf%>70)*(rnd(2)>.985)
  303. 1216 pd%=pd%+(pf%>87)*(rnd(2)>.93)-(1400*rnd(2)<day%)
  304. 1220 onqs%goto1221,1223,1225
  305. 1221 sd%=sd%+(sf%>75)*(rnd(2)>.9997)+(sf%>93)*(rnd(2)>.995)
  306. 1222 sd%=sd%+(sf%>97)*(rnd(2)>.94)-(3000*rnd(2)<day%):goto1230
  307. 1223 sd%=sd%+(sf%>60)*(rnd(2)>.9992)+(sf%>85)*(rnd(2)>.99)
  308. 1224 sd%=sd%+(sf%>94)*(rnd(2)>.92)-(2400*rnd(2)<day%):goto1230
  309. 1225 sd%=sd%+(sf%>40)*(rnd(2)>.9985)+(sf%>78)*(rnd(2)>.98)
  310. 1226 sd%=sd%+(sf%>89)*(rnd(2)>.9)-(1800*rnd(2)<day%)
  311. 1230 pb%=-(pd%>5)
  312. 1240 sb%=-(sd%>5)
  313. 1250 ifpf%>(100-pd%*10)andpb%>0thenpf%=(100-pd%*10)*(-(100-pd%*10>0))
  314. 1260 ifsf%>(100-sd%*10)andsb%>0thensf%=(100-sd%*10)*(-(100-sd%*10>0))
  315. 1270 rl=rl+rh/50
  316. 1275 fl=int(100-rl)
  317. 1280 rh=(a%*30+a1%*60+a2%*10)/2500*(100-rl)
  318. 1300 ph=pf%*(100*(-(pv%>100))+pv%*(-(pv%<=100)))/350
  319. 1310 eh=ef%/200*(rt%-25)
  320. 1320 rt%=rt%+rh-eh-ph-5*(-(rt%>25))
  321. 1325 rt%=25+(rt%-25)*(-(rt%>25))
  322. 1330 xt%=((rt%-25)*pf%+(ct%-25)*sf%)/(pf%+sf%+1)+25
  323. 1340 ifxb%>0thenxt%=rt%*.8+5
  324. 1350 sh=sf%*(100*(-(pv%>100))+pv%*(-(pv%<=100)))/350*(xt%-ct%)
  325. 1360 ifxb%>0thensh=sh*.2
  326. 1370 gz%=sh/xt%*(xt%-ct%)*2/3
  327. 1375 ifgz%>2600thengz%=2600
  328. 1380 gz%=gz%*(-(gz%>0))*(-(gb%=0))
  329. 1390 ct%=25+((xt%-25)*(sh-gz%)/(sh+1)*.75)
  330. 1395 ct%=25*(-(ct%<=25))+ct%*(-(ct%>25))
  331. 1400 ifxb%<1thenxb%=(-(xd%>2))*(-(rnd(4)>.9))
  332. 1410 ifgb%<1thengb%=(-(gd%>4))*(-(rnd(4)>.9))
  333. 1420 tt=tt+gz%
  334. 1430 goto460
  335. 2000 rem  maintenance repair subroutine
  336. 2010 ev%=300:pv%=120:sv%=120
  337. 2020 qp%=1-(rnd(2)>.57)-(rnd(2)>.95)
  338. 2030 qs%=1-(rnd(2)>.57)-(rnd(2)>.95)
  339. 2040 rt%=25:t7%=25
  340. 2050 xt%=25:t8%=25
  341. 2060 ct%=25:t9%=25
  342. 2070 dmge%=dmge%+2*rd%+ed%+pd%+xd%+sd%+gd%
  343. 2080 md%=5+3*(10*(-(rd%>3))-(ed%>3)-(pd%>3)-(sd%>3)+2*pb%+2*sb%+3*xb%+3*gb%)
  344. 2082 day%=day%+md%:d4%=day%
  345. 2090 rd%=0
  346. 2100 ed%=0
  347. 2110 pd%=0
  348. 2120 xd%=0
  349. 2130 sd%=0
  350. 2140 gd%=0
  351. 2150 pb%=0
  352. 2160 sb%=0
  353. 2170 xb%=0
  354. 2180 gb%=0
  355. 2190 ef%=0:pf%=0:sf%=0
  356. 2195 gz%=0
  357. 2200 return
  358. 3000 ifrd%>6then3100
  359. 3001 forq=1to5:cd$="
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371. ":pokebc,2:pokesc,2:pokelc,7
  372. 3002 print" ":printcd$tab(15)"!Meltdown!
  373. 3005 fort=1to400:next
  374. 3006 pokebc,7:pokesc,7:pokelc,2
  375. 3008 print" ":printcd$tab(15)"!Meltdown!"
  376. 3011 fort=1to400:next:nextq
  377. 3015 print" ":pokesc,0:pokebc,0:pokelc,13
  378. 3017 print"
  379. You are now in charge of a runaway
  380. 3018 print"reactor.  Fuel melting prevents the in-
  381. 3019 print"sertion of control rods.  Initiate your
  382. 3020 print"evacuation plan and notify local and
  383. 3021 print"federal disaster control agencies.
  384. 3022 print"
  385. Insure all retouched weld x-rays are
  386. 3023 print"removed and destroyed.  Insure bogus
  387. 3024 print"certificates for operators and welders
  388. 3025 print"are also removed and destroyed prior to
  389. 3026 print"investigations by AEC and other regula-
  390. 3027 print"tory agencies.
  391. 3028 print"
  392. Prepare and submit rate hike request to
  393. 3029 print"Public Utilities Commission to pay for
  394. 3030 print"repairs to buildings, equipment and for
  395. 3031 print"travel expenses to next convention in
  396. 3032 print"Las Vegas.":goto5005
  397. 3100 forq=1to5:cd$="
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409. "
  410. 3101 pokebc,2:pokesc,2:pokelc,7
  411. 3102 print" "cd$tab(15)"!Meltdown!
  412. 3104 fort=1to400:next
  413. 3106 pokebc,7:pokesc,7:pokelc,2
  414. 3108 print" "cd$tab(15)"!Meltdown!"
  415. 3110 fort=1to400:next:nextq
  416. 3111 pokebc,0:pokesc,0:pokelc,14
  417. 3112 print" ":print"
  418. The feared 'China Syndrome' is now
  419. 3114 print"underway.  Excessive heat from the re-
  420. 3116 print"actor core has ruptured primary coolant
  421. 3118 print"lines, causing a steam explosion.
  422. 3120 print"
  423. The containment building has been
  424. 3122 print"breached and lethal clouds of radio-
  425. 3124 print"active gasses are pouring into the
  426. 3126 print"atmosphere.  Initial estimates indicate
  427. 3128 print"a minimum of 500 square miles will be
  428. 3130 print"contaminated for at least 300 years.
  429. 3132 print"
  430. Immediately contact your stockbroker
  431. 3134 print"to sell all nuclear power stock and to
  432. 3136 print"buy all available coal mining shares.
  433. 3270 poke214,21:print:goto5005
  434. 4000 rem evaluation of game
  435. 4001 pokebc,0:pokesc,0:pokelc,5
  436. 4002 print"
  437.  
  438.       OPERATOR PERFORMANCE REVIEW"
  439. 4003 print:print:print" OPERATOR'S NAME:";spc(3) na$:print:print
  440. 4005 print"  Over a period of "da%" days, you have"
  441. 4010 print"produced an average power output of "
  442. 4015 print""kw%"kW.";
  443. 4016 print" at a value of ";ve$;"."
  444. 4020 ak%=1-(kw%>799)-(kw%>899)-(kw%>999)-(kw%>1099)-(kw%>1199)-(kw%>1299)
  445. 4022 ak%=ak%-(kw%>1399)-(kw%>1499)
  446. 4025 print"
  447.   Your average power production rate is "
  448. 4030 onak%goto4032,4034,4036,4038,4040,4042,4044,4050,4055
  449. 4032 print"horrible! Find a less demanding job.":goto4060
  450. 4034 print"bad. Your area had":print"frequent blackouts.":goto4060
  451. 4036 print"pretty bad. Your area had":print"occasional blackouts.":goto4060
  452. 4038 print"way below your area's power needs.":goto4060
  453. 4040 print"not good.  Your area had brownouts.":goto4060
  454. 4042 print"not bad.  Your area's power needs"
  455. 4043 print"were supplied - just.":goto4060
  456. 4044 print"adequate. You could do better.":goto4060
  457. 4050 print"exellent! Power rates in your area will"
  458. 4051 print"not be increased.":goto4060
  459. 4055 print"near the maximum! Power costs in your"
  460. 4056 print"area will drop significantly."
  461. 4060 gosub2000
  462. 4065 d%=1-(dm%>10)-(dm%>20)-(dm%>30)
  463. 4070 print"
  464.   The equipment damage sustained was"
  465. 4075 ond%goto4080,4085,4090,4095
  466. 4080 print"very light.":goto4096
  467. 4085 print"moderate.":goto4096
  468. 4090 print"serious.":goto4096
  469. 4095 print"severe."
  470. 4096 print"Total repair costs were ";rc$
  471. 5000 gp$=str$(gp):ifgp<1000thengp$="$"+gp$:goto5002
  472. 5001 gp$="$"+left$(gp$,len(gp$)-3)+","+right$(gp$,3)
  473. 5002 print"This resulted in a total of "gp$" in       gross  profits.
  474. 5005 print:print:input"Play Again (Yes or No)";a$:a$=left$(a$,1)
  475. 5010 ifa$<>"y"thenend
  476. 5015 gosub2000:goto390
  477. 5100 b$=""
  478. 5105 fori=1to4
  479. 5110 geta$
  480. 5130 ifasc(a$)<>94then5140
  481. 5134 ifb$=""thenreturn
  482. 5136 out%=val(b$)
  483. 5138 return
  484. 5140 rem pet only * ifasc(a$)=13thensys50583:goto1170
  485. 5150 b$=b$+a$
  486. 5160 printa$;
  487. 5170 nexti
  488. 5180 return
  489. 5300 forj6=1to63*z4:nextj6:z4=z4+3:return:rem delay
  490. 5310 poke214,23:print:print"   Press SPACE to continue...";
  491. 5311 poke214,23:wait198,1:print:printbl$;:getzz$:return
  492. 8000 rem*core temp warning*
  493. 8005 forq=1to15
  494. 8010 print"
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501. 8015 print"Reactor Core.....800
  502. 8020 fort=1to175:next
  503. 8025 print"
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510. 8030 print"Reactor Core.....800
  511. 8035 fort=1to175:next
  512. 8040 nextq
  513. 8045 print"
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520. 8050 print"Reactor Core.....800
  521. 8055 return
  522. 9000 rem*heat exch warning
  523. 9005 forq=1to15
  524. 9010 print"
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. 9015 print"Heat Exchanger...500
  533. 9020 fort=1to175:next
  534. 9025 print"
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542. 9030 print"Heat Exchanger...500
  543. 9035 fort=1to175:next
  544. 9040 nextq
  545. 9045 print"
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553. 9050 print"Heat Exchanger...500
  554. 9055 return
  555. 9500 rem*cooling tower warning*
  556. 9505 forq=1to15
  557. 9510 print"
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566. 9515 print"Cooling Tower....300
  567. 9520 fort=1to175:next
  568. 9525 print"
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577. 9530 print"Cooling Tower....300
  578. 9535 fort=1to175:next
  579. 9540 nextq
  580. 9545 print"
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589. 9550 print"Cooling Tower....300
  590. 9555 return
  591. 16000 zd$="
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613. "
  614. 16005 print" ":printzd$"This is the reactor vessel            "
  615. 16010 print"
  616.  
  617.  
  618.  
  619.      "
  620. 16015 print"    "
  621. 16020 forzz=1to4:print"        ":next
  622. 16025 print"       "
  623. 16030 print"        "
  624. 16035 print"    "
  625. 16040 z4=11:gosub5300:gosub5310
  626. 16050 printzd$"This is the core                      "
  627. 16055 print"
  628.  
  629.  
  630.  
  631.  
  632.  
  633.     "
  634. 16060 forzz=1to3:print"       ":next
  635. 16065 gosub5300:gosub5310
  636. 16070 printzd$"This is the emergency coolant         "
  637. 16075 print"
  638.  
  639.  
  640.  "
  641. 16080 print" "
  642. 16085 print" "
  643. 16086 print" "
  644. 16090 print" "
  645. 16095 print"
  646.  "
  647. 16096 print" "
  648. 16097 forzz=1to3:print" ":next
  649. 16100 gosub5300:gosub5310
  650. 16105 printzd$"These are the control rods            "
  651. 16110 print"
  652.  
  653. "tab(5)""
  654. 16115 printtab(5)""
  655. 16120 printtab(5)""
  656. 16125 printtab(5)""
  657. 16126 printtab(5)""
  658. 16130 z4=11:gosub5300:gosub5310
  659. 16135 printzd$"This is the primary coolant loop      "
  660. 16140 print"
  661.  
  662.  
  663. "tab(12)""
  664. 16150 printtab(12)""
  665. 16155 printtab(13)""
  666. 16156 printtab(13)""
  667. 16160 printtab(8)" "
  668. 16165 printtab(15)""
  669. 16170 printtab(8)" "
  670. 16175 gosub5300:gosub5310
  671. 16180 printzd$"This is the heat exchanger            "
  672. 16185 print"
  673.  
  674.  
  675.  
  676.  
  677.  
  678. "tab(14)""
  679. 16190 printtab(14)"  "
  680. 16195 printtab(14)"  "
  681. 16200 printtab(14)"  "
  682. 16205 printtab(14)""
  683. 16210 z4=11:gosub5300:gosub5310
  684. 16220 printzd$"This is the secondary coolant loop    "
  685. 16225 print"
  686.  
  687.  
  688. "tab(17)""
  689. 16230 printtab(17)""
  690. 16235 printtab(18)"
  691. 16236 printtab(18)"
  692. 16240 printtab(16)""
  693. 16250 printtab(16)""tab(33)""
  694. 16255 printtab(16)""tab(33)""
  695. 16260 printtab(18)""tab(33)""
  696. 16265 printtab(18)""tab(33)""
  697. 16270 printtab(33)""
  698. 16271 printtab(33)""
  699. 16275 printtab(33)""
  700. 16280 printtab(21)""tab(33)""
  701. 16281 printtab(21)""
  702. 16285 gosub5300:gosub5310
  703. 16290 printzd$"This is the turbine                   "
  704. 16295 print"
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716. "tab(17)""
  717. 16300 printtab(17)""
  718. 16305 printtab(17)""
  719. 16310 printtab(17)""
  720. 16315 gosub5300:gosub5310
  721. 16320 printzd$"This is the electric generator        "
  722. 16325 print"
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734. "tab(10)""
  735. 16330 printtab(10)"     "
  736. 16335 printtab(10)""
  737. 16340 printtab(10)""
  738. 16345 z4=11:gosub5300:gosub5310
  739. 16350 printzd$"This is the cooling tower             "
  740. 16355 print"
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749. "tab(24)""tab(31)""
  750. 16360 printtab(24)""tab(30)""
  751. 16365 printtab(25)""tab(29)""
  752. 16370 printtab(26)""tab(29)""
  753. 16371 printtab(26)""tab(29)""
  754. 16372 printtab(26)""tab(29)""
  755. 16375 printtab(25)""tab(29)""
  756. 16380 printtab(25)"      "
  757. 16385 gosub5300:gosub5310
  758. 16390 printzd$"This is the complete diagram.         "
  759. 16395 gosub5310:print" ":poke53272,23:return
  760. 17000 return
  761.  
  762.  
  763.  
  764.